﻿#if NETSTANDARD2_0_OR_GREATER

using System;
using System.Text.Json.Serialization;

namespace zijian666.Converts.Json;
/// <summary>
/// JSON 转换器
/// </summary>
public static class JsonConverters
{
    /// <summary>
    /// 适用于 <seealso cref="System.DateTime"/> 类型的JSON转换器
    /// </summary>
    public static readonly JsonConverter DateTime = new JsonValueConverter<DateTime>();
    /// <summary>
    /// 适用于 <seealso cref="System.TimeSpan"/> 类型的JSON转换器
    /// </summary>
    public static readonly JsonConverter TimeSpan = new JsonValueConverter<TimeSpan>();
    /// <summary>
    /// 适用于 <seealso cref="System.DateTimeOffset"/> 类型的JSON转换器
    /// </summary>
    public static readonly JsonConverter DateTimeOffset = new JsonValueConverter<DateTimeOffset>();
    /// <summary>
    /// 适用于 <seealso cref="System.Guid"/> 类型的JSON转换器
    /// </summary>
    public static readonly JsonConverter Guid = new JsonValueConverter<Guid>();
    /// <summary>
    /// 适用于代理对象类型的JSON转换器, 例如动态类型, <seealso cref="System.IConvertible"/> "/>等
    /// </summary>
    public static readonly JsonConverter ProxyObject = new ProxyObjectJsonConvererFactory();
    /// <summary>
    /// 适用于 <seealso cref="System.Text.Json.JsonElement"/> 类型的JSON转换器
    /// </summary>
    public static readonly JsonConverter JsonElement = new JsonElementTranslator();
}


#endif